package net.util;

import java.util.Collection;

public class BooleanUtil 
{
	private BooleanUtil()
	{
		
	}
	
	public static boolean argumentsAreNullOrEqual(Object arg0, Object arg1)
	{
		return arg0 == null ? arg1 == null : arg0.equals(arg1);
	}
	
	public static boolean arrayIsValid(Object[] array)
	{
		return array != null && array.length >0;
	}
	
	public static boolean stringIsValid(String string)
	{
		return string != null && string.length() > 0;
	}
	
	public static boolean collectionIsValid(Collection<?> collection)
	{
		return collection != null && collection.size() > 0;
	}
}
